#ifndef _MAT_SFX_MANAGER_H_
#define _MAT_SFX_MANAGER_H_


#include "mat_sfx.h"
#include "mat_sounds.h"

#include "vfx/sfx.h"


class MATSFXCollection;

namespace vfx
{
	class NumberFXSet;
	class SimpleTextSFX;
}

class	MATNumberSFX : public vfx::EffectMan
{
public:

	MATNumberSFX();
	~MATNumberSFX();
	
	void								AddNumber(int Number, const math::Vec2& Pos);

private:
	vfx::NumberFXSet*					m_pSfxFlyNumber;	

};

class MATSFXManager
{

public:
	
	static MATSFXManager&			Instance();
	


	
	
	virtual void						Render(const math::Vec2& Offset,float Scale);
										// After UI
	virtual void						PostRender(const math::Vec2& Offset,float Scale);
	virtual void						RenderDebug(const math::Vec2& Offset,float Scale);
	virtual void						Tick(float dt);


	void								ForceFinish();
	void								Clear();
	MATSfx*								Spawn(
											MATSfx::SFX_TYPES Type, 
											const math::Vec2& Pos,
											float SizeScale,
											float Rotation = 0,
											bool	bIsChache = false,
											MATSounds::SOUND_NAMES SoundSFXName = MATSounds::SFX_NONE
											
											);
	void								AddFlySfxNumber(int Number, const math::Vec2& Pos);

	MATSfx*								GetCacheSfx(MATSfx::SFX_TYPES Type);
	void								Cache();	
	
protected:

	MATSFXManager();
	~MATSFXManager();

	MATNumberSFX						m_NumberSFX;
	
	
	std::vector<MATSFXCollection*>		m_SFXCollections;
	std::vector<MATSfx*>				m_CacheSfxs;	

};



#endif